package com.ebt.m.data.rxModel.api;

import com.ebt.m.commons.model.data.BaseDataResult;
import com.ebt.m.msgnote.bean.MsgTypeBean;
import com.ebt.m.msgnote.bean.ReadMsgBean;
import com.ebt.m.msgnote.bean.TypeMsgItems;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * 消息中心API
 * Created by allen on 2018/7/27 11:23.
 */
public interface MsgAPI {
    /**
     * 查询消息中心分类
     *
     * @return
     */
    @GET("/proposal/message/center/type/list")
    Observable<BaseDataResult<List<MsgTypeBean>>> getMsgCenterList();

    /**
     * 查询消息中心内容
     *
     * @param params
     * @return
     */
    @GET("/proposal/message/center/content/list")
    Observable<BaseDataResult<List<TypeMsgItems>>> getTypeMsgList(@QueryMap Map<String, String> params);

    /**
     * 标记消息中心内容已读
     *
     * @param id
     * @return
     */
    @PUT("/proposal/message/center/content/read")
    Observable<BaseDataResult<ReadMsgBean>> readMsg(@Query("id") int id);
}
